package com.pocketsweet.model;

import java.util.Date;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVObject;
import com.pocketsweet.C;

@AVClassName("MLTestOrder")
public class MLTestOrder extends AVObject {
	public static final String SPONSOR = "sponsor";
	public static final String WINNER = "winner";
	public static final String STATUS = "status";
	public static final String STARTTIME = "startTime";
	public static final String LOVESTARTTIME = "loveStartTime";// 爱心加时开始的时间

	public MLTestOrder() {
		// setTimeAdd(C.ORDER_TIMEADD_NO);
	}

	public Date getStartTime() {
		if (super.getDate(STARTTIME) != null) {
			return super.getDate(STARTTIME);
		} else {
			return null;
		}
	}

	public void setStartTime(Date value) {
		super.put(STARTTIME, value);
	}

	public Date getLoveStartTime() {
		if (super.getDate(LOVESTARTTIME) != null) {
			return super.getDate(LOVESTARTTIME);
		} else {
			return null;
		}
	}

	public void setLoveStartTime(Date value) {
		super.put(LOVESTARTTIME, value);
	}

	// //////////////////////////////////////////
	// 外键
	// //////////////////////////////////////////
	public MLUser getSponsor() {
		return (MLUser) super.getAVUser(SPONSOR);
	}

	public void setSponsor(MLUser user) {
		super.put(SPONSOR, user);
	}

	public MLUser getWinner() {
		return (MLUser) super.getAVUser(WINNER);
	}

	public void setWinner(MLUser user) {
		super.put(WINNER, user);
	}

	public int getStatus() {
		return super.getInt(STATUS);
	}

	public void setStatus(int value) {
		super.put(STATUS, value);
	}
}
